<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="common/common_head :: commonHeader('供应商管理系统 ')"/>
</head>

<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">

    <div style="padding: 0" id="wrapper">
        <!--左侧导航开始-->
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="nav-close"><i class="fa fa-times-circle"></i>
            </div>
            <div class="sidebar-collapse">
                <ul class="nav" id="side-menu">
                    <li class="nav-header">
                        <input id="userId" th:value="${currUser.userId}" type="hidden">
                        <div id="privateInfo" class="dropdown profile-element" style="text-align: center;">
                            <span>
                                 <img alt="image" class="img-circle"
                                      th:src="@{${avatar != '' and avatar != null ? '/sys/user/getPic/'+avatar : '/img/touxiang02.png'}}"/>
                             </span>
                            <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <span class="clear">
                                <span id="susername" style="padding-bottom: 2%" class="text-muted text-xs block"
                                      th:text="${'欢迎您，'+currUser.name}">总部
                                    <b class="caret"></b></span>
                                </span>
                            </a>
                            <ul style="top: 98%" class="dropdown-menu dropdown-messages">
                                <!--<li><a class="J_menuItem" th:href="@{'/sys/user/toUserCenter/'+${currUser.userId}}">个人资料</a>
                                </li>-->
                                <li class="divider"></li>
                                <li><a href="#" th:href="@{'#'}" onclick="updatePwd()">修改密码</a>
                                <li class="divider"></li>
                                <li><a href="#" th:href="@{/logout}">安全退出</a>
                                </li>
                            </ul>
                        </div>
                        <div class="logo-element">SRM</div>
                    </li>
                    <li th:each="item,iterStat  : ${menuList}">
                        <a th:href="@{${item.list != '' and item.list != null ? '#' : item.url}}">
                            <i class="fa fa fa-bar-chart-o" th:class="${item.icon}"></i>
                            <span class="nav-label" th:text="${item.name}"></span>
                            <span class="fa arrow"></span>
                        </a>
                        <ul class="nav nav-second-level" th:if="${item.list != '' and item.list != null}">
                            <li th:each="second,iterStat  : ${item.list}">
                                <a th:if="${second.list != '' and second.list != null}" th:href="${'#'}">
                                    <span class="nav-label" th:text="${second.name}"></span>
                                    <span class="fa arrow"></span>
                                </a>
                                <a class="J_menuItem" th:if="${second.list == '' or second.list == null}"
                                   th:href="@{${second.url}}" th:text="${second.name}">
                                </a>
                                <ul class="nav nav-third-level" th:if="${second.list != '' and second.list != null}">
                                    <li th:each="third,iterStat : ${second.list}">
                                        <a class="J_menuItem" th:href="${'#'}" th:if="${third.list != '' and third.list != null}"
                                           th:text="${third.name}"></a>
                                        <a class="J_menuItem" th:href="@{${third.url}}" th:if="${third.list == '' or third.list == null}"
                                           th:text="${third.name}"></a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </nav>
        <!--左侧导航结束-->
        <!--右侧部分开始-->
        <div id="page-wrapper" class="gray-bg dashbard-1">
            <div class="row border-bottom">
                <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header"><a class="navbar-minimalize minimalize-styl-2 btn btn-primary " ><i class="fa fa-bars"></i></a>
                    </div>
                    <ul class="nav navbar-top-links navbar-right">
                        <li class="dropdown">
                            <a class="dropdown-toggle count-info" data-toggle="dropdown" href="#" onclick="showNoticeList()">
                                <i class="fa fa-bell"></i> <h3><span class="label label-danger" id="showQuery" style="display: none"></span></h3>
                            </a>
                        </li>
                        <li class="dropdown hidden-xs">
                            <a class="right-sidebar-toggle" aria-expanded="false">
                                <i class="fa fa-tasks"></i> 主题
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
            <div class="row content-tabs">
                <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
                </button>
                <nav class="page-tabs J_menuTabs">
                    <div class="page-tabs-content">
                        <a id="indexUrl" href="javascript:;" class="active J_menuTab"
                           th:data-id="@{/toHome}">首页</a>
                    </div>
                </nav>
                <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
                </button>
                <div class="btn-group roll-nav roll-right">
                    <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>

                    </button>
                    <ul role="menu" class="dropdown-menu dropdown-menu-right">
                        <li class="J_tabShowActive"><a>定位当前选项卡</a>
                        </li>
                        <li class="divider"></li>
                        <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
                        </li>
                        <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
                        </li>
                    </ul>
                </div>
                <a href="login1.html" th:href="@{/logout}" class="roll-nav roll-right J_tabExit"><i
                        class="fa fa fa-sign-out"></i> 退出
                </a>
            </div>
            <div class="row J_mainContent" id="content-main">
                <iframe id="J_iframe" class="J_iframe" name="iframe0" width="100%" th:data-id="@{/toHome}" height="100%" src="index_v3.html?v=4.0"
                        th:src="@{/toHome}" frameborder="0" seamless></iframe>
            </div>
            <div class="footer">
                <div class="pull-right">Copyright © 2018 - 2028 <a href="#" target="_blank">供应商管理系统 V1.0.0</a>
                </div>
            </div>
        </div>
        <!--右侧部分结束-->
        <!--右侧边栏开始-->
        <div id="right-sidebar">
            <div class="sidebar-container">

                <ul class="nav nav-tabs navs-3">

                    <li class="active">
                        <a data-toggle="tab" href="#tab-1">
                            <i class="fa fa-gear"></i> 主题
                        </a>
                    </li>
                </ul>

                <div class="tab-content">
                    <div id="tab-1" class="tab-pane active">
                        <div class="sidebar-title">
                            <h3> <i class="fa fa-comments-o"></i> 主题设置</h3>
                            <small><i class="fa fa-tim"></i> 你可以从这里选择和预览主题的布局和样式，这些设置会被保存在本地，下次打开的时候会直接应用这些设置。</small>
                        </div>
                        <div class="skin-setttings">
                            <div class="title">主题设置</div>
                            <div class="setings-item">
                                <span>收起左侧菜单</span>
                                <div class="switch">
                                    <div class="onoffswitch">
                                        <input type="checkbox" name="cn.isharemenu" class="onoffswitch-checkbox"
                                               id="collapsemenu"/>
                                        <label class="onoffswitch-label" for="collapsemenu">
                                            <span class="onoffswitch-inner"></span>
                                            <span class="onoffswitch-switch"></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="setings-item">
                                <span>固定顶部</span>

                                <div class="switch">
                                    <div class="onoffswitch">
                                        <input type="checkbox" name="fixednavbar" class="onoffswitch-checkbox"
                                               id="fixednavbar"/>
                                        <label class="onoffswitch-label" for="fixednavbar">
                                            <span class="onoffswitch-inner"></span>
                                            <span class="onoffswitch-switch"></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="setings-item">
                                <span>
                        固定宽度
                    </span>
                                <div class="switch">
                                    <div class="onoffswitch">
                                        <input type="checkbox" name="boxedlayout" class="onoffswitch-checkbox"
                                               id="boxedlayout"/>
                                        <label class="onoffswitch-label" for="boxedlayout">
                                            <span class="onoffswitch-inner"></span>
                                            <span class="onoffswitch-switch"></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="title">皮肤选择</div>
                            <div class="setings-item default-skin nb">
                                <span class="skin-name ">
                         <a href="#" class="s-skin-0">
                             默认皮肤
                         </a>
                    </span>
                            </div>
                            <div class="setings-item blue-skin nb">
                                <span class="skin-name ">
                        <a href="#" class="s-skin-1">
                            蓝色主题
                        </a>
                    </span>
                            </div>
                            <div class="setings-item yellow-skin nb">
                                <span class="skin-name ">
                        <a href="#" class="s-skin-3">
                            黄色/紫色主题
                        </a>
                    </span>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <!--右侧边栏结束-->
    </div>
    <audio id="myaudio" th:src="@{/static/js/hplus/msg.mp3}" controls="controls" hidden="true" />

    <!--引入公共js-->
    <div th:include="common/onload_js :: onloadJS"></div>
    <script type="text/javascript" th:src="@{/static/js/hplus/mydropdown.js}"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            dropdownOpen();
        });

       /**
        * 鼠标划过就展开子菜单，免得需要点击才能展开
        */
       function dropdownOpen() {

           var $dropdownLi = $('li.dropdown');
           var $dropdownDiv = $('div.dropdown');

           $dropdownLi.mouseover(function() {
               $(this).addClass('open');
           }).mouseout(function() {
               $(this).removeClass('open');
           });

           $("#privateInfo").mouseover(function() {
               $(this).addClass('open');
           }).mouseout(function() {
               $(this).removeClass('open');
           });
       }

        function updatePwd() {
            var userId = $("#userId").val();
            Dialog.openUrl("修改密码", ctxPath + '/modules/sys/user/update_pwd.html/',{ area : ['550px','400px']});
        }

        /**
         * 显示消息通知
         */
        function showNoticeList() {
            let count=$("#showQuery").text();
            if(count!=0){
                $("#J_iframe").contents().find("#noticeList").show();
            }
        }
    </script>
</body>
</html>
